package com.itheima.config;

import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description: test
 * @Create by: JJ菜菜
 * @Date: 2021/10/29 20:30
 */

@Configuration
public class PageConfig{

    @Bean
    public MybatisPlusInterceptor mybatisPlusInterceptor(){
        MybatisPlusInterceptor mpIntercerptor = new MybatisPlusInterceptor();
        mpIntercerptor.addInnerInterceptor(new PaginationInnerInterceptor());
        return mpIntercerptor;
    }
}
